// For authoring Nightwatch tests, see
// http://nightwatchjs.org/guide#usage

module.exports = {
  'default e2e tests': function (browser) {
    // automatically uses dev Server port from /config.index.js
    // default: http://localhost:8080
    // see nightwatch.conf.js
    const devServer = browser.globals.devServerURL

    browser
      .url(devServer)
      .waitForElementVisible('#app', 5000)
      browser.click(".el-button")
      .waitForElementVisible('.main-container', 5000)
      browser.click(".hamburger-container")
      browser.click(".el-submenu:nth-child(2)")
      browser.click(".el-submenu:nth-child(2) .el-menu>a")
      .waitForElementVisible('.app-container', 5000)
      browser.click(".el-button--primary")
      .waitForElementVisible('.el-form', 5000)
      browser.click(".goback_btn")
       .end()
  }
}
